package com.xiaoqi.store.dao;

import com.xiaoqi.store.entity.UserEntity;

import java.util.Date;

/**
 * @Author Rookie Coder
 * @Description
 * @Date
 **/
public interface UserMapper {

    /*
    * @Author xiaoqi
    * @Description  根据用户名查询用户
    * @return true 或 false
    **/
    UserEntity selectUserByUsername(String username);

    /*
    * @Author xiaoqi
    * @Description  插入用户信息
    * @return true 或 false
    **/
    int insertUser(UserEntity userEntity);

    /*
    * @Author xiaoqi
    * @Description  根据用户名密码查询用户信息
    * @return User
    **/
    UserEntity selectUserByUsernameAndPassword(String username, String password);

    /*
    * @Author xiaoqi
    * @Description  修改用户密码
    * @return
    **/
    int updateUserPassword(Integer uid, String username, Date modifyTime , String newPassword);

    /*
    * @Author xiaoqi
    * @Description  通过用户id查找到用户信息
    * @return
    **/
    UserEntity selectUserByUid(Integer uid);

    /*
    * @Author xiaoqi
    * @Description  修改用户信息
    * @return
    **/
    int updateUserInfo(String phone, String email,Integer gender, Date date, String username);

    /*
    * @Author xiaoqi
    * @Description  更新用户图像
    * @return
    **/
    void updloadUserAvator(Integer uid, String avatarPath, Date modifyTime, String modifyUser);
}
